#include "tcpServer.hpp"
#include <memory>

static void Usage(std::string proc)
{
    std::cout << "\nUsage:\n\t" << proc << " local_port\n\n";
}
int main(int argc,char *argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(-1);
    }
    uint16_t port = atoi(argv[1]);

    std::unique_ptr<server::tcpServer> server1 (new server::tcpServer(port));
    server1->initServe();
    server1->start();
    
    return 0;
}
